-
Notifications
You must be signed in to change notification settings - Fork 1.1k
update mpt docs for permissioneddomains #3251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: rippled-3.0.0
Are you sure you want to change the base?
Conversation
mDuo13
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear, this is set to go into rippled version 3.0.0, not version 2.6.0 which is the next planned release?
docs/references/protocol/transactions/types/mptokenissuancecreate.md
Outdated
Show resolved
Hide resolved
docs/references/protocol/transactions/types/mptokenissuanceset.md
Outdated
Show resolved
Hide resolved
Yes. Although the changes are in release 2.6.0, they are amendment gated by |
docs/references/protocol/transactions/types/mptokenissuancecreate.md
Outdated
Show resolved
Hide resolved
docs/references/protocol/transactions/types/mptokenissuanceset.md
Outdated
Show resolved
Hide resolved
docs/references/protocol/transactions/types/mptokenissuancecreate.md
Outdated
Show resolved
Hide resolved
docs/references/protocol/transactions/types/mptokenissuanceset.md
Outdated
Show resolved
Hide resolved
docs/references/protocol/transactions/types/mptokenissuanceset.md
Outdated
Show resolved
Hide resolved
| | `tecNO_DELEGATE_PERMISSION` | You are attempting to use a delegate account with insufficient permissions to submit this transaction. | | ||
| | `tecNO_DST` | The account specified in the `Holder` field doesn't exist. | | ||
| | `tecNO_PERMISSION` | - The `lsfMPTCanLock` flag isn't enabled, but you are attempting to lock or unlock an MPT.<br>- The `SingleAssetVault` amendment is disabled and you're trying to modify a `DomainID` field. | | ||
| | `temMALFORMED` | - You specified a `DomainID` and `Holder` value--only one can be set in a single transaction.<br>- You specified the same account for both `Acount` and `Holder`.<br>- The transaction isn't changing anything; it must either update a flag or modify the `DomainID`. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
temMALFORMED is a code that can occur for any transaction type.
| | `temMALFORMED` | - You specified a `DomainID` and `Holder` value--only one can be set in a single transaction.<br>- You specified the same account for both `Acount` and `Holder`.<br>- The transaction isn't changing anything; it must either update a flag or modify the `DomainID`. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment in issuancecreate. I think it's helpful to explain how you'd malform this specific transaction.
| | `temBAD_TRANSFER_FEE` | The transfer fee specified is greater than the maximum allowed value of 50,000. | | ||
| | `temDISABLED` | The `MPTokensV1` amendment is disabled. You will also receive this error if you include a `DomainID` field in the transaction, but the `PermissionedDomains` and `SingleAssetVault` amendments are both disabled. | | ||
| | `tecINSUFFICIENT_RESERVE` | The account creating the `MPTokenIssuance` ledger entry doesn't have enough XRP to meet the owner reserve. | | ||
| | `temMALFORMED` | - A non-zero transfer fee is set, but the `tfMPTCanTransfer` flag is _not_ set.<br>- The `DomainID` points to an invalid permissioned domain; you can also receive this error if you include a `DomainID` without setting the `tfMPTRequireAuth` flag.<br>- The `MPTokenMetadata` field is an invalid length (0 or exceeds 1024 bytes).<br>- The `MaximumAmount` field is 0 or exceeds 9,223,372,036,854,775,807 (2^63-1). | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
temMALFORMED is one of the errors that can occur for any transaction type.
| | `temMALFORMED` | - A non-zero transfer fee is set, but the `tfMPTCanTransfer` flag is _not_ set.<br>- The `DomainID` points to an invalid permissioned domain; you can also receive this error if you include a `DomainID` without setting the `tfMPTRequireAuth` flag.<br>- The `MPTokenMetadata` field is an invalid length (0 or exceeds 1024 bytes).<br>- The `MaximumAmount` field is 0 or exceeds 9,223,372,036,854,775,807 (2^63-1). | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but I think it's helpful to explain what specifically you could be malforming to make it easier for someone to troubleshoot.
Maybe I could preface it with something like: "Besides generally malformed transactions, you can receive this error if ..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are infinite ways to creatively malform a transaction, but if there are common uses or patterns that hit the specific cases described here, then I agree it makes sense to note it here with a preface like you suggested.
642ae4a to
682389e
Compare
| | `temBAD_TRANSFER_FEE` | The transfer fee specified is greater than the maximum allowed value of 50,000. | | ||
| | `temDISABLED` | The `MPTokensV1` amendment is disabled. You will also receive this error if you include a `DomainID` field in the transaction, but the `PermissionedDomains` and `SingleAssetVault` amendments are both disabled. | | ||
| | `tecINSUFFICIENT_RESERVE` | The account creating the `MPTokenIssuance` ledger entry doesn't have enough XRP to meet the owner reserve. | | ||
| | `temMALFORMED` | - A non-zero transfer fee is set, but the `tfMPTCanTransfer` flag is _not_ set.<br>- The `DomainID` points to an invalid permissioned domain; you can also receive this error if you include a `DomainID` without setting the `tfMPTRequireAuth` flag.<br>- The `MPTokenMetadata` field is an invalid length (0 or exceeds 1024 bytes).<br>- The `MaximumAmount` field is 0 or exceeds 9,223,372,036,854,775,807 (2^63-1). | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are infinite ways to creatively malform a transaction, but if there are common uses or patterns that hit the specific cases described here, then I agree it makes sense to note it here with a preface like you suggested.
| | Field | JSON Type | [Internal Type][] | Required? | Description | | ||
| |:------------------|:---------------------|:------------------|:----------|:------------| | ||
| | `AssetScale` | Number | UInt8 | No | Where to put the decimal place when displaying amounts of this MPT. More formally, the asset scale is a non-negative integer (0, 1, 2, …) such that one standard unit equals 10^(-scale) of a corresponding fractional unit. For example, if a US Dollar Stablecoin has an asset scale of _2_, then 1 unit of that MPT would equal 0.01 US Dollars. This indicates to how many decimal places the MPT can be subdivided. If omitted, the default is 0, meaning that the MPT cannot be divided into smaller than 1 unit. | | ||
| | `DomainID` | String - [Hash][] | UInt256 | No | The ledger entry ID of a permissioned domain that grants access to the MPT. You must set the `tfMPTRequireAuth` flag to use permissioned domains.<br>{% amendment-disclaimer name="PermissionedDomains" /%}<br>{% amendment-disclaimer name="SingleAssetVault" /%} | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- You don't need
<br>tags here, since the disclaimer already uses its own<p>tag. - Use "enable" instead of "set" for clarity when talking about flags. ("Set? To what?")
- This is currently (as expected) throwing errors because the SingleAssetVault amendment isn't in the VHS data yet. We should make a note to come back and double-check this before merging to the master branch, closer to release—but it's not a blocker for merging to the
rippled-3.0.0branch.
| | `DomainID` | String - [Hash][] | UInt256 | No | The ledger entry ID of a permissioned domain that grants access to the MPT. You must set the `tfMPTRequireAuth` flag to use permissioned domains.<br>{% amendment-disclaimer name="PermissionedDomains" /%}<br>{% amendment-disclaimer name="SingleAssetVault" /%} | | |
| | `DomainID` | String - [Hash][] | UInt256 | No | The ledger entry ID of a permissioned domain that grants access to the MPT. You must enable the `tfMPTRequireAuth` flag to use permissioned domains. {% amendment-disclaimer name="PermissionedDomains" /%} {% amendment-disclaimer name="SingleAssetVault" /%} | |
|
|
||
| | Field | JSON Type | [Internal Type][] | Required? | Description | | ||
| |:--------------------|:---------------------|:------------------|:----------|-------------| | ||
| | `DomainID` | String - [Hash][] | UInt256 | No | The ledger entry ID of a permissioned domain that grants access to the MPT. An empy value or `0` will remove permissioned domain access management. Any accounts that lose access to the MPT because of `DomainID` updates--unless explicitly authorized by the MPT issuer--lose the ability to send or receive MPTs they already hold. The `tfMPTRequireAuth` flag must have been set in the `MPTokenIssuanceCreate` transaction to use permissioned domains.<br>{% amendment-disclaimer name="PermissionedDomains" /%}<br>{% amendment-disclaimer name="SingleAssetVault" /%} | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Typo ("empy")
- Avoid future tense.
- Use an actual emdash instead of two hyphens. (Here's one you can copy-paste: — ) Or better yet, avoid phrasing sentences with this type of interjection in the first place.
- The description feels a little confusing about when you lose the ability to send or receive MPTs.
- The phrase "permissioned domain access management" feels a little ambiguous or confusing, like it's controlling who has access to manage the domain itself, and I don't think it's defined anywhere in those exact terms. Either rephrase into simpler language or shorten this description and link to a better description on a concept page.
- Rather than talk about the exact transaction flag from the create transaction, talk about the current state of the MPT issuance (among other reasons, maybe that flag is mutable).
| | `DomainID` | String - [Hash][] | UInt256 | No | The ledger entry ID of a permissioned domain that grants access to the MPT. An empy value or `0` will remove permissioned domain access management. Any accounts that lose access to the MPT because of `DomainID` updates--unless explicitly authorized by the MPT issuer--lose the ability to send or receive MPTs they already hold. The `tfMPTRequireAuth` flag must have been set in the `MPTokenIssuanceCreate` transaction to use permissioned domains.<br>{% amendment-disclaimer name="PermissionedDomains" /%}<br>{% amendment-disclaimer name="SingleAssetVault" /%} | | |
| | `DomainID` | String - [Hash][] | UInt256 | No | The ledger entry ID of a permissioned domain that grants access to the MPT. An empty value or `0` removes the permissioned domain from the MPT issuance so that only users who are explicitly approved by the issuer can send and receive the MPT. You can only set a `DomainID` if the MPT issuance has [**Require Auth**](/docs/concepts/tokens/fungible-tokens/multi-purpose-tokens#transferability-controls) enabled.) {% amendment-disclaimer name="PermissionedDomains" /%} {% amendment-disclaimer name="SingleAssetVault" /%} | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, I opened #3392 since it feels like we need better documentation on how to create and use allow-listing with MPTs (concept/tutorial/code sample/etc.).
Updated
MPTTokenIssuanceCreateandMPTokenIssuanceSettransaction docs to includeDomainIDfield. Also added additional error codes.Documents changes to MPT that are gated by Single Asset Vaults: XRPLF/rippled#5509